package com.blrs.service.supplier.impl;

import java.util.List;

import com.blrs.common.utils.ReflectionUtils;
import com.blrs.common.utils.SecurityUtils;
import com.blrs.service.supplier.IHonorManagementTeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.blrs.mapper.HonorManagementTeacherMapper;
import com.blrs.domain.HonorManagementTeacher;

/**
 * 师资管理荣誉资质信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-18
 */
@Service
public class HonorManagementTeacherServiceImpl implements IHonorManagementTeacherService
{
    @Autowired
    private HonorManagementTeacherMapper honorManagementTeacherMapper;

    /**
     * 查询师资管理荣誉资质信息
     * 
     * @param id 师资管理荣誉资质信息主键
     * @return 师资管理荣誉资质信息
     */
    @Override
    public HonorManagementTeacher selectHonorManagementTeacherById(String id)
    {
        return honorManagementTeacherMapper.selectHonorManagementTeacherById(id);
    }

    /**
     * 查询师资管理荣誉资质信息列表
     * 
     * @param honorManagementTeacher 师资管理荣誉资质信息
     * @return 师资管理荣誉资质信息
     */
    @Override
    public List<HonorManagementTeacher> selectHonorManagementTeacherList(HonorManagementTeacher honorManagementTeacher)
    {
        return honorManagementTeacherMapper.selectHonorManagementTeacherList(honorManagementTeacher);
    }

    /**
     * 新增师资管理荣誉资质信息
     * 
     * @param honorManagementTeacher 师资管理荣誉资质信息
     * @return 结果
     */
    @Override
    public int insertHonorManagementTeacher(HonorManagementTeacher honorManagementTeacher) throws Exception
    {
        ReflectionUtils.setCommonPrivateProperty(honorManagementTeacher);
        return honorManagementTeacherMapper.insertHonorManagementTeacher(honorManagementTeacher);
    }

    /**
     * 修改师资管理荣誉资质信息
     * 
     * @param honorManagementTeacher 师资管理荣誉资质信息
     * @return 结果
     */
    @Override
    public int updateHonorManagementTeacher(HonorManagementTeacher honorManagementTeacher)
    {
        return honorManagementTeacherMapper.updateHonorManagementTeacher(honorManagementTeacher);
    }

    /**
     * 批量删除师资管理荣誉资质信息
     * 
     * @param ids 需要删除的师资管理荣誉资质信息主键
     * @return 结果
     */
    @Override
    public int deleteHonorManagementTeacherByIds(String[] ids)
    {
        return honorManagementTeacherMapper.deleteHonorManagementTeacherByIds(ids);
    }

    /**
     * 删除师资管理荣誉资质信息信息
     * 
     * @param id 师资管理荣誉资质信息主键
     * @return 结果
     */
    @Override
    public int deleteHonorManagementTeacherById(String id)
    {
        return honorManagementTeacherMapper.deleteHonorManagementTeacherById(id);
    }

    @Override
    public String checkSync(String projectId) {
        return honorManagementTeacherMapper.checkSync(projectId,SecurityUtils.getOrgId());
    }
}
